home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 February
/
Macworld (1997-02).dmg
/
Shareware World
/
Info
/
csmp digest Vol 4 No 021
< prev
next >
Wrap
Text File
|
1996-11-19
|
64KB
|
1,829 lines
C.S.M.P. Digest Thu, 14 Nov 96 Volume 4 : Issue 21
Today's Topics:
Ejecting an empty CD Caddy
HELP: Circular Definition
Help in programming game!!!
How do you get the pixel depth of the Main Device?
PPC Trap Patching...
Think Reference vs Mac Programmers Toolbox Assistant
[ANN] Metrowerks CodeWarrior IDE 1.7.2 i
[Q] Initialize a resource at compile time
[Q] phonemes
[Q] what sends an update event?
The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
(marka@ee.mcgill.ca).
The digest is a collection of article threads from the internet
newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
csmp.games. It is designed for people who read news semi-regularly and
want an archive of the discussions. If you don't know what a
newsgroup is, you probably don't have access to it. Ask your systems
administrator(s) for details. If you don't have access to news, you
may still be able to post messages to the group by using a mail server
like anon.penet.fi (mail help@anon.penet.fi for more information).
Each issue of the digest contains one or more sets of articles (called
threads), with each set corresponding to a 'discussion' of a particular
subject. The articles are not edited; all articles included in this digest
are in their original posted form (as received by our news server at
ee.mcgill.ca). Article threads are not added to the digest until the last
article added to the thread is at least two weeks old (this is to ensure that
the thread is dead before adding it to the digest). Article threads that
consist of only one message are generally not included in the digest.
The digests can be obtained by email, ftp or through the World Wide Web.
If you want to receive the digest by mail, send email to
majordomo@ee.mcgill.ca with no subject and one of the following commands
as body:
help Sends you a summary of commands
subscribe csmp Adds you to the mailing list
unsubscribe csmp Removes you from the list
Once you have subscribed, you will automatically receive each new
issue as it is created.
Back issues are available by ftp from Info-Mac mirror sites in the
per/csmp subdirectory, e.g.
ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
The contents of all back issues can be searched by accessing the
following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
http://marvin.stattech.com.au/search.html
They can also be searched through the following URLs, thanks to
Tim Tuck (Tim.Tuck@sensei.com.au):
http://wais.sensei.com.au/searchform.html
wais://wais.sensei.com.au:210/csmp?
-------------------------------------------------------
>From simon.l@mail.stpeters.qld.edu.au (Simon Long)
Subject: Ejecting an empty CD Caddy
Date: Mon, 28 Oct 1996 15:52:39 +1000
Organization: University of Queensland
I've been writing a series of DA's and general Finder tools; one such was
a chunk of code to eject an empty CD tray. This could be done in
Applescript if there was a CD in it, but unfortunately the Finder
interface doesn't recognise empty CD drives.
Because of this, I switched to programming in pascal in order to use SCSI
devices to accomplish this but I'm not familiar with this area. Can anyone
write in with a piece to show how I can eject an empty CD caddy?
+++++++++++++++++++++++++++
>From bierman@apple.com (Peter Bierman)
Date: Wed, 30 Oct 1996 15:51:25 -0800
Organization: I do not speak for Apple Computer!
In article <simon.l-2810961552390001@203.15.60.104>,
simon.l@mail.stpeters.qld.edu.au (Simon Long) wrote:
> devices to accomplish this but I'm not familiar with this area. Can anyone
> write in with a piece to show how I can eject an empty CD caddy?
My CD drive won't keep an empty caddy in. If you mean CD-tray, that's
slightly different, but I think that there's been disucssion here before
on why that would be a bad idea. Trays are fragile, and opening or closing
one when the user wasn't expecting it could be very bad.
I shudder to think of how many cokes would be in my keyboards if the tray
opened on it's own.
-pmb
--
bierman@apple.com
http://www.upl.cs.wisc.edu/~lunatic/ "This is MASS MADNESS you MANIACS!"
+++++++++++++++++++++++++++
>From dricklin@nesc.org
Date: 1 Nov 1996 19:45:46 GMT
Organization: Deja News USENET Posting Service
John Brochu is the author of PopCD a shareware program available from most
regular sources that does this. It auto ejects on shutdown and will pull the
draw back in on a mouse click. He can be reached at johnbrochu@aol.com according
to it's about... screen.
Donald R Ricklin
http://www.nesc.org/~dricklin
- ---------------------------------------------------------------------
This article was posted to Usenet via the Posting Service at Deja News:
http://www.dejanews.com/ [Search, Post, and Read Usenet News!]
---------------------------
>From David Charles Hirschfield <dch+@andrew.cmu.edu>
Subject: HELP: Circular Definition
Date: Wed, 23 Oct 1996 21:12:11 -0400
Organization: Sophomore, Computer Science, Carnegie Mellon, Pittsburgh, PA
I'm having trouble doing the following in Codewarrior 9 C++:
class BaseClass {
public:
void UseThis(SubClass theThing);
private:
...
...
}
class SubClass : public BaseClass {
...
}
Codewarrior doesn't like the fact that I am trying to pass the sub class
in, since it isn't defined till after the base class.
Is there any way to get this to work?
-David hirschfield
+-===========================================================================-+
| --== e-mail ==-- |
| _/_/_/ _/_/ _/ _/ _/_/_/ dch+@andrew.cmu.edu |
| _/ _/ _/ _/ _/ _/ _/ or |
| _/ _/ _/_/_/_/ _/ _/ _/_/ cddch@paleo.giss.nasa.gov |
| _/ _/ _/ _/ _/_/ _/ |
| _/_/_/ _/ _/ _/ _/_/_/ --== WWW ==-- |
| http://www.contrib.andrew.cmu.edu/~dch/ |
+-===========================================================================-+
+++++++++++++++++++++++++++
>From craig@epic.co.uk (Craig Emery)
Date: Thu, 24 Oct 1996 13:03:28 +0100
Organization: Epic Miltimedia Group
In article <UmPg9fq00iWXAEGVEo@andrew.cmu.edu>, David Charles Hirschfield
<dch+@andrew.cmu.edu> wrote:
>I'm having trouble doing the following in Codewarrior 9 C++:
>
>class BaseClass {
> public:
> void UseThis(SubClass theThing);
>
> private:
> ...
> ...
>}
>
>class SubClass : public BaseClass {
> ...
>}
>
>Codewarrior doesn't like the fact that I am trying to pass the sub class
>in, since it isn't defined till after the base class.
>
>Is there any way to get this to work?
Put "class SubClass;" (witout the quotes) in a line above the first
line. If you have inline functions that access members of these classes
then you'll need to delcare both classes first and **then** all the inline
functions. to help things I actuall declare inline methods **in the class
declaration** as inline. e.g.
class Craig;
class Emery
{ public:
virtual inline Method (Craig& aCraig);
int m_nNumber;
};
class Craig : public Emery
{ public:
virtual inline Method (Craig aCraig);
int m_nNumber2;
};
inline Craig::Method (Craig& aCraig)
{
aCraig.m_nNumber2 = m_nNumber2;
};
inline Emery::Method (Craig& aCraig)
{
aCraig.m_nNumber2 = m_nNumber;
// because this inline method uses a member of Craig it must be
// **defined** after Craig has been **fully declared**
// if you had defined it **within** the class declaration of Emery that
would be an illegal
// use of a partially declared class
};
Enjoy.
Craig.
-----------------------------------------------------------------------
| Norman Craig Emery B.Sc., craig@epic.co.uk |
| Team Leader / Senior CDi Programmer & CRAIG.EPIC@applelink.apple.com |
| Macintosh Programming Coordinator, Voice: +44 (0) (1273) 320637 |
| The Epic Multimedia Group, Fax: +44 (0) (1273) 821567 |
| http://www.epic.co.uk/ |
| VPS House, 52 Old Steine, Brighton, East Sussex, BN1 1NH, U.K. |
-----------------------------------------------------------------------
+++++++++++++++++++++++++++
>From gga@it.ntu.edu.au (Giles Alexander)
Date: 24 Oct 1996 11:27:30 GMT
Organization: Northern Territory University
David Charles Hirschfield (dch+@andrew.cmu.edu) wrote:
: I'm having trouble doing the following in Codewarrior 9 C++:
You need to include the definition of the SubClass up here. And above that
include the following line:
class BaseClass;
That will tell CW that a class is coming called BaseClass, much like function
prototypes.
: class BaseClass {
[snip]
Regards,
Giles Alexander
--
giles@kagi.com | If builders built buildings the way
| programmers write programs, the
Check out Note: | first woodpecker that comes along
http://alexanderg.ntu.edu.au/giles/note/ | would destroy all of civilisation.
+++++++++++++++++++++++++++
>From Allan Young <allan_young@broder.com>
Date: Thu, 24 Oct 1996 08:23:47 -0700
Organization: Broderbund Software Inc.
> I'm having trouble doing the following in Codewarrior 9 C++:
>
> class BaseClass {
> public:
> void UseThis(SubClass theThing);
>
> private:
> ...
> ...
> }
>
> class SubClass : public BaseClass {
> ...
> }
>
> Codewarrior doesn't like the fact that I am trying to pass the sub class
> in, since it isn't defined till after the base class.
> Is there any way to get this to work?
Since SubClass is inherited from BaseClass, you should be able to change
the declaration for UseThis to
void UseThis( BaseClass theThing );
Really, though, you should avoid having the base class itself know
specifics about a subclass.
-Al
+++++++++++++++++++++++++++
>From "Aidan Cully" <aidan@xanadu.kublai.com>
Date: 1 Nov 96 12:11:18 -0400
Organization: INTAC Access Corporation - An Internet Service Provider
>I'm having trouble doing the following in Codewarrior 9 C++:
>
>class BaseClass {
> public:
> void UseThis(SubClass theThing);
>
> private:
> ...
> ...
>}
>
>class SubClass : public BaseClass {
> ...
>}
>
>Codewarrior doesn't like the fact that I am trying to pass the sub class
>in, since it isn't defined till after the base class.
>
>
>Is there any way to get this to work?
Easy..
class SubClass;
class BaseClass {
public:
void UseThis(SubClass theThing);
private:
...
...
}
class SubClass : public BaseClass {
...
}
---------------------------
>From steph@supernet.ab.ca (Stephane Grenier)
Subject: Help in programming game!!!
Date: 28 Oct 1996 04:59:48 GMT
Organization: Cyberion Networking Corp.
Hello!!!
First of all I would like to thank you for taking the time to look at
this message. I'm in the middle of programming a hexagonal strategic game.
My problem is that I have a coordinate h,v and a maximal movement "move".
>From these values, how can I determine if the unit moved is within the
allowed movements. I need a function that would do this, and I have no
idea how to begin. This is of course in C, and any help would be
appreciated.
I also have, I forgot to mention, that the coordinates h,v are where
the unit begins. h2,v2 are where the unit are suppose to end. How can I
make sure h,v is within a movement allowance of "move" to h2,v2???
Thanks,
Steph
+++++++++++++++++++++++++++
>From squires@crl.com (Scott Squires)
Date: Mon, 28 Oct 1996 07:35:45 -0800
Organization: Puffin Designs
In article <steph-2710962302000001@rd-p23.supernet.ab.ca>,
steph@supernet.ab.ca (Stephane Grenier) wrote:
>
> First of all I would like to thank you for taking the time to look at
>this message. I'm in the middle of programming a hexagonal strategic game.
>My problem is that I have a coordinate h,v and a maximal movement "move".
>From these values, how can I determine if the unit moved is within the
>allowed movements. I need a function that would do this, and I have no
>idea how to begin. This is of course in C, and any help would be
>appreciated.
>
> I also have, I forgot to mention, that the coordinates h,v are where
>the unit begins. h2,v2 are where the unit are suppose to end. How can I
>make sure h,v is within a movement allowance of "move" to h2,v2???
distance = sqrt((h1-h2)**2 + (v1-v2)**2)
or simpler:
distance**2 == (h1-h2)**2 + (v1-v2)**2 (for comparing distances)
Check out Tricks of the Mac Game Programming Gurs from Hayden Books
It covers all of this including hex displays.
Also check out the various mac game programming web sites.
-scott
Scott Squires "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com
+++++++++++++++++++++++++++
>From brianm@caledonia.polaristel.net (Brian P. McCarty)
Date: Mon, 28 Oct 1996 12:32:13 -0600
Organization: totally disorganized
In article <steph-2710962302000001@rd-p23.supernet.ab.ca>,
steph@supernet.ab.ca (Stephane Grenier) wrote:
> Hello!!!
>
> First of all I would like to thank you for taking the time to look at
> this message. I'm in the middle of programming a hexagonal strategic game.
> My problem is that I have a coordinate h,v and a maximal movement "move".
> From these values, how can I determine if the unit moved is within the
> allowed movements. I need a function that would do this, and I have no
> idea how to begin. This is of course in C, and any help would be
> appreciated.
>
> I also have, I forgot to mention, that the coordinates h,v are where
> the unit begins. h2,v2 are where the unit are suppose to end. How can I
> make sure h,v is within a movement allowance of "move" to h2,v2???
3 suggestions
1) ask on c.s.m.p.games, you will probably get more help
2) "Tricks of the Mac Game Programming Gurus" has some hex map code
3) Try to find the code for Mac Xconq, it is a hex based strategy game.
(sorry, don't know where to look)
>
> Thanks,
> Steph
Brian
--
Brian P. McCarty, N9IWP
e-mail:brianm@caledonia.polaristel.net
snail-mail:410 S. Ramsey, Apt. 4 Caledonia, MN 55921-1116
ICBM:43deg 38' 05" N 91deg 29' 48" W
+++++++++++++++++++++++++++
>From "Aidan Cully" <aidan@xanadu.kublai.com>
Date: 1 Nov 96 12:11:56 -0400
Organization: INTAC Access Corporation - An Internet Service Provider
>Hello!!!
>
> First of all I would like to thank you for taking the time to look at
>this message. I'm in the middle of programming a hexagonal strategic game.
>My problem is that I have a coordinate h,v and a maximal movement "move".
>From these values, how can I determine if the unit moved is within the
>allowed movements. I need a function that would do this, and I have no
>idea how to begin. This is of course in C, and any help would be
>appreciated.
>
> I also have, I forgot to mention, that the coordinates h,v are where
>the unit begins. h2,v2 are where the unit are suppose to end. How can I
>make sure h,v is within a movement allowance of "move" to h2,v2???
>
>Thanks,
>Steph
>
The way I would probably handle this is to figure out just how far out a
person can move in every direction. If the (h,v) coordinates are inside
this boundary, everythings groovy.
This can be done by keeping track of the present direction, and looping
through every possible one.
For example
enum {
north=0,
northeast=1,
southeast=2,
south=3,
southwest=4,
northwest=5
};
dir = north;
track = new point[moves];
sendmoves( track, moves );
while( dir <= northwest ) {
temp = moves;
while( temp-- ) {
endpoint[x] = track[moves];
x++;
sendmoves( track+temp, dir+1, moves-temp );
}
dir++;
}
void sendmoves( point *track, int dir, int numMoves ) {
while( numMoves-- )
*track = //assign new value based on direction
}
At any rate, I'm sure you get the idea. There's probably a better way to
do this, but if you can move equally well on all types of terrain, it will
do. And, it has the bonus advantage of being able to tell _before_ a user
makes his move where he's allowed to go.
---------------------------
>From Scott Sams <sbsams@eos.ncsu.edu>
Subject: How do you get the pixel depth of the Main Device?
Date: Wed, 30 Oct 1996 05:15:00 -0400
Organization: NC State University
I am using SetDepth to set the depth of the screen to a certain depth,
but I need to change it back to the way it was before when the program
ends. How do you find the pixel depth of the main device using
GetMainDevice?
Thanks in advance
--
____ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Scott Sams
(____ _ _-|-|- sbsams@eos.ncsu.edu
_____)(__(_)| | http://www.catt.ncsu.edu/~gamma
~~~~~~~~~~~~~~~ Custom Internet Graphics & Programming
+++++++++++++++++++++++++++
>From SouthSide@kagi.com (Bob Bradley)
Date: Thu, 31 Oct 1996 00:15:40 -0800
Organization: SPC
In article <32771C70.1E12@eos.ncsu.edu>, sbsams@eos.ncsu.edu wrote:
> I am using SetDepth to set the depth of the screen to a certain depth,
> but I need to change it back to the way it was before when the program
> ends. How do you find the pixel depth of the main device using
> GetMainDevice?
Here's a routine that'll get the bit depth of the device passed in:
SInt16 GetBitDepth( GDHandle device )
{
return( ( **( **device ).gdPMap ).pixelSize );
}
For the main device, you would just pass in the result of GetMainDevice.
+++++++++++++++++++++++++++
>From Greg Jorgensen <gregj@europa.com>
Date: Fri, 01 Nov 1996 00:01:22 -0800
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Scott Sams wrote:
>
> I am using SetDepth to set the depth of the screen to a certain depth,
> but I need to change it back to the way it was before when the program
> ends. How do you find the pixel depth of the main device using
> GetMainDevice?
I've always done it like this:
short GetDepth(GDHandle gdevice)
{
short depth = 0;
if ( gdevice && (*gdevice)->gdPMap )
depth = (*((*gdevice)->gdPMap))->pixelSize;
return depth;
}
This is not the same thing as finding out what the maximum depth a
device can support; use the Toolbox function HasDepth() for that.
--
Greg Jorgensen - Portland, Oregon, USA - gregj@europa.com
"In a recent fire, [Bob] Dole's library burned down. Both books were
lost. And he hadn't even finished coloring one." -- Jack Kemp
---------------------------
>From Lech Dziewulski <lechd@magic.fr>
Subject: PPC Trap Patching...
Date: Tue, 29 Oct 1996 09:02:29 +0100
Organization: Magic OnLine
I am looking to write an INIT that patches _GetResource. This INIT works
remarkably well on 68K Macs ( to my standards at least ), but crashes at
each startup on PPC, if written in native PPC code.
Can anybody explain this ?
+++++++++++++++++++++++++++
>From test@admin
Date: Wed, 30 Oct 96 09:08:25 +0000
Organization: (none)
On Tue, Oct 29, 1996,9:02 AM lechd wrote:
>I am looking to write an INIT that patches _GetResource. This INIT works
>remarkably well on 68K Macs ( to my standards at least ), but crashes at
>each startup on PPC, if written in native PPC code.
>
>Can anybody explain this ?
>
>
>
End of excerpt from lechd.
Hard to without the code:-)
Regards, Andy
+++++++++++++++++++++++++++
>From kjray@ix.netcom.com (C. Keith Ray)
Date: Sat, 02 Nov 1996 17:23:33 -0700
Organization: Netcom
> >In article <3275BA05.42E@magic.fr>, lechd@magic.fr wrote:
> >
> >> I am looking to write an INIT that patches _GetResource. This INIT works
> >> remarkably well on 68K Macs ( to my standards at least ), but crashes at
> >> each startup on PPC, if written in native PPC code.
> >>
> >> Can anybody explain this ?
Depending on which version of the System Software and PowerMac
ROM you're using, the resource manager is 68k code, NOT powerpc code.
Thus, only doing a PPC patch will crash because the ROM is running
the resource manager in 68k emulation.
// Keith and Jane
---- // ---
- -------- Check out: <http://www.devworld.apple.com/>
- ------- <http://www.devtools.apple.com/>
- -------- <http://www.evangelist.macaddict.com/>
----------- <http://www.solutions.apple.com/listadmin>
--- ---
+++++++++++++++++++++++++++
>From devon@onyx-tech.com (Devon Hubbard)
Date: Sat, 02 Nov 1996 14:19:16 -0700
Organization: Onyx Technology, Inc.
In article <hooty-0111962225270001@news.odyssee.net>, hooty@odyssee.net
(Eric Dorland) wrote:
>In article <3275BA05.42E@magic.fr>, lechd@magic.fr wrote:
>
>> I am looking to write an INIT that patches _GetResource. This INIT works
>> remarkably well on 68K Macs ( to my standards at least ), but crashes at
>> each startup on PPC, if written in native PPC code.
>>
>> Can anybody explain this ?
We had the same problem when we took our QC(tm) product PowerPC native.
The only work around we found was to make it a FAT patch. Unfortunately,
nobody at Apple working on Resource Mgr stuff could tell us what was going
on with a native-only PPC patch on GetResource crashing. Like you, we
would crash almost immediately after the patch was made [on the very next
call to GetResource]. If you did a 68K patch it would work fine, but a
PPC patch would crash. Don't waste any more time debugging this. A FAT
patch works just fine. Or depending on what your GetResource patch is
doing, you might want to just leave it 68K.
If you need info or help doing a FAT patch, let me know.
dEVoN
- ----------------------------------------------------------------------
Devon Hubbard Onyx Technology, Inc
Silicon Pilot support@onyx-tech.com
devon@onyx-tech.com http://www.onyx-tech.com/
Visit our web site for fully a functional demo of QC
+++++++++++++++++++++++++++
>From devon@onyx-tech.com (Devon Hubbard)
Date: Mon, 04 Nov 1996 20:10:46 -0700
Organization: Onyx Technology, Inc.
In article <jwwalker-ya023080000311962217110001@news.millennianet.com>,
jwwalker@kagi.com (James W. Walker) wrote:
>In article <devon-0211961419170001@cust28.max7.phoenix.az.ms.uu.net>,
>devon@onyx-tech.com (Devon Hubbard) wrote:
>
>>We had the same problem when we took our QC(tm) product PowerPC native.
>>The only work around we found was to make it a FAT patch. Unfortunately,
>>nobody at Apple working on Resource Mgr stuff could tell us what was going
>>on with a native-only PPC patch on GetResource crashing. Like you, we
>>would crash almost immediately after the patch was made [on the very next
>>call to GetResource]. If you did a 68K patch it would work fine, but a
>>PPC patch would crash. Don't waste any more time debugging this. A FAT
>>patch works just fine.
>
>If you do a fat patch, how do you know that the PowerPC part of it actually
>works? When I did a fat patch of GetResource, I tested the PowerPC version
>of the patch by installing it as a PowerPC-only patch, subject to a
>DEBUG_PPC preprocessor flag. It seemed to work for me.
By writing a native PPC application that calls GetResource. Mixed mode
will take your native PPC GetResource route. Of course you do have to
know what other extensions might be installing on your Mac and patching
GetResource too. If you have an extension that patches GR after you do
with 68K code them MixedMode will take the 68K route on the first patch to
GR and continue on the 68K road into your FAT patch. Mmmm, did that make
sense?
dEVoN
+++++++++++++++++++++++++++
>From jwwalker@kagi.com (James W. Walker)
Date: Sun, 03 Nov 1996 22:17:11 -0800
Organization: Nisus Software, Inc.
In article <devon-0211961419170001@cust28.max7.phoenix.az.ms.uu.net>,
devon@onyx-tech.com (Devon Hubbard) wrote:
>We had the same problem when we took our QC(tm) product PowerPC native.
>The only work around we found was to make it a FAT patch. Unfortunately,
>nobody at Apple working on Resource Mgr stuff could tell us what was going
>on with a native-only PPC patch on GetResource crashing. Like you, we
>would crash almost immediately after the patch was made [on the very next
>call to GetResource]. If you did a 68K patch it would work fine, but a
>PPC patch would crash. Don't waste any more time debugging this. A FAT
>patch works just fine.
If you do a fat patch, how do you know that the PowerPC part of it actually
works? When I did a fat patch of GetResource, I tested the PowerPC version
of the patch by installing it as a PowerPC-only patch, subject to a
DEBUG_PPC preprocessor flag. It seemed to work for me.
--
-- Jim Walker <http://members.aol.com/jwwalker/>
+++++++++++++++++++++++++++
>From hooty@odyssee.net (Eric Dorland)
Date: Fri, 01 Nov 1996 22:25:27 -0400
Organization: Odyssee Internet
In article <3275BA05.42E@magic.fr>, lechd@magic.fr wrote:
> I am looking to write an INIT that patches _GetResource. This INIT works
> remarkably well on 68K Macs ( to my standards at least ), but crashes at
> each startup on PPC, if written in native PPC code.
>
> Can anybody explain this ?
I can't help you but I've had similar problems. Please tell me if you find
an answer.
Eric Dorland
hooty@odyssee.net
http://www.odyssee.net/~hooty/
---------------------------
>From r.harmon@soc.soton.ac.uk (Robin Harmon)
Subject: Think Reference vs Mac Programmers Toolbox Assistant
Date: Tue, 29 Oct 1996 16:22:23 +0000
Organization: The Natural Environment Research Council
Could someone who is familliar with both of these comment on the
ease of use and speed of the Mac Programmers Toolbox Assistant
compared to Think Reference. I am familliar with Think Reference and
am thinking of buying the Toolbox Assistant. Is it as well cross-linked
as TR? Is it a good substitute for all of the Inside Mac books?
Thanks for your comments in advance
Robin Harmon
+++++++++++++++++++++++++++
>From "Zane H. Healy" <healyzh@ix.netcom.com>
Date: Thu, 31 Oct 1996 01:14:45 -0800
Organization: Netcom
Robin Harmon wrote:
>
> Could someone who is familliar with both of these comment on the
> ease of use and speed of the Mac Programmers Toolbox Assistant
> compared to Think Reference. I am familliar with Think Reference and
> am thinking of buying the Toolbox Assistant. Is it as well cross-linked
> as TR? Is it a good substitute for all of the Inside Mac books?
I've got a question I'd like to throw in on this. Isn't the interface
for TBA the same as that for a lot of the online docs for CodeWarrior?
Specifically those that have links to TBA (excuse the vagueness I'm
going from memory, I'm saving disk space so the CW doc's aren't
installed).
The reason I ask is I prefer the Think Reference interface. To the one
used with CW. I've been thinking about getting TBA though, so that I'd
be able to access the language specific DB's that come with CW as well
as the Mac API DB's that are in the Toolbox Assistant. Of course from
my stand-point the solution would be for MacTech to have language
specific DB's on the next release of their CD-ROM.
Just my two cents.
Zane
+++++++++++++++++++++++++++
>From Online@MacTech.com ( nick.c @MT )
Date: Thu, 31 Oct 1996 18:38:06 -0800
Organization: MacTech Magazine
r.harmon@soc.soton.ac.uk (Robin Harmon) wrote:
>Could someone who is familliar with both of these comment on the
>ease of use and speed of the Mac Programmers Toolbox Assistant
>compared to Think Reference. I am familliar with Think Reference and
>am thinking of buying the Toolbox Assistant. Is it as well cross-linked
>as TR? Is it a good substitute for all of the Inside Mac books?
Disclaimer: MacTech (us) owns Think Reference now, so I'm not
completely unbiased.
That said both TR and MPTA are kool products, but neither is
a substitute for the NIM books. The NIM books and the
desktop data bases TR & MPTA serve very different purposes.
NIM is an encyclopedia--it lists everything you ever wanted
to know about the Toolbox. But sometimes you don't need
all that data, you a function prototype or quick example
of how to use a function, and you need it now.
Think Reference solves that problem. You can trigger it
with a hot-key from within either CodeWarrior or Symantec C++
automatically paste the prototype for a function (hi-lighted
in the IDE of your choice) back into your IDE. You can
do the same with MPTA.
Think Reference has (IMHO) better navigation, and a wealth
of example code. Furthermore, you can now get it bundled
with 11 years of MacTech magazine, hypertext linked on a
single CD for less than the cost of MPTA.
<http://www.mactech.com/cdrom/>
This is really handy, if you're dealing with more complex
issues (like off screen graphics). Sometimes it's not
enough to just see the function prototype, and even TR's
example code might not be enough. In that case you can
use the embedded HT links to check out MacTech articles
on the subject.
The one place that MPTA does have an advantage over TR
is in comprehensiveness. It's not NIM, but it does have
some toolbox calls that haven't yet been incorporated into
the TR databases. Personally, I still use TR--which has
90+% of all the calls, and all the ones I need. As I
said at the outset, I'm biased. But then, I was using
TR rather than MPTA long before I got involved with MacTech.
Hope that helps some. Luck,
____Nicholas C. DeMello, Ph.D.___________________________________________
"MacTech Online"--MacTech Magazine, for Mac OS Programmers and Developers
http://www.MacTech.com/
_/ _/ _/ _/_/_/ _/ _/
Chemistry: Nick@chem.UCLA.edu _/_/ _/ _/ _/ _/ _/_/_/
MacTech: Online@MacTech.com _/ _/_/ _/ _/ _/ _/
http://www.chem.ucla.edu/~nick/ _/ _/ _/_/_/ _/ _/
+++++++++++++++++++++++++++
>From "Zane H. Healy" <healyzh@ix.netcom.com>
Date: Fri, 01 Nov 1996 00:05:00 -0800
Organization: Netcom
nick.c @MT wrote:
> Disclaimer: MacTech (us) owns Think Reference now, so I'm not
> completely unbiased.
>
> That said both TR and MPTA are kool products, but neither is
> a substitute for the NIM books. The NIM books and the
> desktop data bases TR & MPTA serve very different purposes.
No, but TR is a whole lot easier to use than the NIM books in either
paper or CD format! More importantly I don't really understand Pascal,
and most of the NIM examples are written in Pascal. That can get really
confusing!
> Think Reference solves that problem. You can trigger it
> with a hot-key from within either CodeWarrior or Symantec C++
> automatically paste the prototype for a function (hi-lighted
> in the IDE of your choice) back into your IDE. You can
> do the same with MPTA.
>
> Think Reference has (IMHO) better navigation, and a wealth
> of example code. Furthermore, you can now get it bundled
> with 11 years of MacTech magazine, hypertext linked on a
> single CD for less than the cost of MPTA.
> the TR databases. Personally, I still use TR--which has
> 90+% of all the calls, and all the ones I need. As I
Agreed, Agreed, and Agreed!
There is one major problem I've got with TR, and that is the lack of a
Language reference. I'm using CodeWarrior, and their databases are in
MPTA format. But I want to use TR, uh-uh, I also need to use the CW
databases for "C" occasionally. This results in me either pulling a
book off the shelf (this wastes valuable time), or changing the config
pop up the MPTA format databases.
Here is my question. How can I get a "C" function database in TR
format? This would be invaluable, and I'm sure there are Pascal and C++
programmers that feel the same.
Zane
+++++++++++++++++++++++++++
>From ajgainsf@actrix.gen.nz (Allen Gainsford)
Date: Sat, 02 Nov 1996 12:51:51 +1300
Organization: Actrix Networks Limited
In article <32786E49.6F08@ix.netcom.com>, "Zane H. Healy"
<healyzh@ix.netcom.com> wrote:
> Robin Harmon wrote:
> >
> > Could someone who is familliar with both of these comment on the
> > ease of use and speed of the Mac Programmers Toolbox Assistant
> > compared to Think Reference. I am familliar with Think Reference and
> > am thinking of buying the Toolbox Assistant. Is it as well cross-linked
> > as TR? Is it a good substitute for all of the Inside Mac books?
>
> I've got a question I'd like to throw in on this. Isn't the interface
> for TBA the same as that for a lot of the online docs for CodeWarrior?
> Specifically those that have links to TBA (excuse the vagueness I'm
> going from memory, I'm saving disk space so the CW doc's aren't
> installed).
>
> The reason I ask is I prefer the Think Reference interface. To the one
> used with CW. I've been thinking about getting TBA though, so that I'd
> be able to access the language specific DB's that come with CW as well
> as the Mac API DB's that are in the Toolbox Assistant. Of course from
> my stand-point the solution would be for MacTech to have language
> specific DB's on the next release of their CD-ROM.
It would be nice if there were a relatively recent version of the Think
Reference databases, too.
Allen
- --------------------------------------------------------------------------
"For scientific discovery -- give me SCOTT. For speed and efficiency of
travel -- give me AMUNDSEN. But when disaster strikes and all hope is
gone, get down on your knees and pray for SHACKLETON."
--- Sir Edmund Hillary
+++++++++++++++++++++++++++
>From jordanz@altura.com (Jordan Zimmerman)
Date: Fri, 01 Nov 1996 11:03:08 -0900
Organization: Altura Software, Inc.
In article <Online-3110961838060001@news.ucla.edu>, Online@MacTech.com (
nick.c @MT ) wrote:
> r.harmon@soc.soton.ac.uk (Robin Harmon) wrote:
>
> >Could someone who is familliar with both of these comment on the
> >ease of use and speed of the Mac Programmers Toolbox Assistant
> >compared to Think Reference. I am familliar with Think Reference and
> >am thinking of buying the Toolbox Assistant. Is it as well cross-linked
> >as TR? Is it a good substitute for all of the Inside Mac books?
>
>
There are differences in both the content of MPTA and TR as well as
differences in the applications (i.e. the viewers of the content).
-CONTENT-
Think Reference's content is basically out of date. However, the content
that is there (as it relates to its time period) is very good. The content
writers went to great pains to try to include all known tidbits of Mac
programming at the time. There's lots of sample code, Tech Notes, etc. The
staleness of the content, however, makes it only partially useful today.
MPTA's content is essentially the Reference sections of the various Inside
Macintosh. There is some source code as well. The content authors went to
a great deal of trouble to provide as much information as possible that is
current and broad.
-VIEWERS-
Think Reference's Viewer is specifically targeted at the problem of
displaying online reference material. It's not feature rich, but it's very
fast and lean. Even though I'm one of the creators of QuickView, I've
always loved the Think Reference Viewer.
While not entirely noticeable to users, TR's Viewer has only a modest
layout engine. There are many formatting options Apple uses in its Inside
Mac that TR's Viewer couldn't handle (tables being the most obvious).
MPTA's Viewer is QuickView (mea culpa). QuickView is a general purpose
multimedia and online reference engine. It uses a cross platform source
file format. While certainly not as fast or lean as TR, it has many more
features: full text searching with boolean operators, inline text
selection, the window's width can be changed (TR has a hard coded width
for windows that can't be changed), keyword indexes, popup topics,
previous/next topics, among others.
Another bonus of QuickView is in developing content. QuickView's compiler
was (still is?) much more robust than the TR compiler. Further it can
handle many more features of RTF (the source file format) than TR.
Hope this helps.
--
Jordan Zimmerman
Altura Software, Inc.
home page: http://www.altura.com/jordanz
Harry Browne for President!
http://www.harrybrowne96.org 1 (800) 682 1776
+++++++++++++++++++++++++++
>From David_McGavran@discovery.umeres.maine.edu (David McGavran)
Date: Sat, 2 Nov 1996 14:12:29 -0500
Organization: University of Maine
I have only seen Think Reference, but I wouldn't trade MPTA for
anything. It is an invaluable tool, and is very well linked.
Dave
+++++++++++++++++++++++++++
>From julianv@mindspring.com (Julian Vrieslander)
Date: Fri, 01 Nov 1996 21:22:42 -0500
Organization: coffee-based life form
In article <Online-3110961838060001@news.ucla.edu>, Online@MacTech.com (
nick.c @MT ) wrote:
> Think Reference has (IMHO) better navigation, and a wealth
> of example code. Furthermore, you can now get it bundled
> with 11 years of MacTech magazine, hypertext linked on a
> single CD for less than the cost of MPTA.
>
> <http://www.mactech.com/cdrom/>
>
> This is really handy, if you're dealing with more complex
> issues (like off screen graphics). Sometimes it's not
> enough to just see the function prototype, and even TR's
> example code might not be enough. In that case you can
> use the embedded HT links to check out MacTech articles
> on the subject.
I know that TR has internal hyperlinks. Are you saying that the TR
database has been modified to add links to the MacTech articles on your CD?
Or are those links in a separate index?
--
Julian Vrieslander <mailto:julianv@mindspring.com>
+++++++++++++++++++++++++++
>From Online@MacTech.com ( nick.c @MT )
Date: Fri, 01 Nov 1996 19:06:16 -0800
Organization: MacTech Magazine
julianv@mindspring.com (Julian Vrieslander) wrote:
>I know that TR has internal hyperlinks. Are you saying that the TR
>database has been modified to add links to the MacTech articles on your CD?
>Or are those links in a separate index?
The TR databases don't contain links to the MacTech articles--
I made a mistake by implying that they did. However, you
can get the same effect by using the global search after
you have reviewed the TR data. The global search will search
all databases--TR and MacTech. Sorry for the confusion,
____Nicholas C. DeMello, Ph.D.___________________________________________
"MacTech Online"--MacTech Magazine, for Mac OS Programmers and Developers
http://www.MacTech.com/
_/ _/ _/ _/_/_/ _/ _/
Chemistry: Nick@chem.UCLA.edu _/_/ _/ _/ _/ _/ _/_/_/
MacTech: Online@MacTech.com _/ _/_/ _/ _/ _/ _/
http://www.chem.ucla.edu/~nick/ _/ _/ _/_/_/ _/ _/
---------------------------
>From MWRon@metrowerks.com (MW Ron)
Subject: [ANN] Metrowerks CodeWarrior IDE 1.7.2 i
Date: Thu, 31 Oct 1996 18:28:47 -0500
Organization: Metrowerks
Metrowerks CodeWarrior IDE 1.7.2 is now publicly available from
the Metrowerks Web site. This update includes numerous bug
fixes for problems reported in the 1.7 IDE. It also
incorporates the Metrowerks Version Control API. This version
of the IDE is required to use the CodeManager IDE plugin found
with CodeManager Release 3.
The archive containing this update can be found at:
<ftp://ftp.metrowerks.com/pub/updates/CW10/IDE_1.7.2.sit.hqx>
Archive Size: 1142K
There is no archive password.
--
METROWERKS Ron Liechty
"Software at Work" MWRon@metrowerks.com
http://www.metrowerks.com/about/people/rogues.html#mwron
+++++++++++++++++++++++++++
>From j-guyer@nwu.edu (Jon Guyer)
Date: Thu, 31 Oct 1996 20:22:55 -0600
Organization: Northwestern University, Evanston, IL
In article <MWRon-3110961828470001@aumi3-a02.ccm.tds.net>,
MWRon@metrowerks.com (MW Ron) wrote:
> Metrowerks CodeWarrior IDE 1.7.2 is now publicly available from
> the Metrowerks Web site. This update includes numerous bug
> fixes for problems reported in the 1.7 IDE.
Very nice, but in article <j-guyer-3110961331390001@news.acns.nwu.edu>, I
made the mistake of posting that your updater only needed to see the CD
copy of the 1.7 IDE. I see now that you've changed things (for the worse).
Old updater: good, new updater: BAD.
--
Jonathan E. Guyer
Join LMESOTENPAMSNFZ
("Let's make everything south of the 89th parallel
a Microsoft no-fly-zone" AKA "Give Bill the Pole!")
+++++++++++++++++++++++++++
>From "Christophe ANDRES" <chrisoft@calva.net>
Date: 4 Nov 96 22:39:07 +0100
Organization: CalvaCom Networks
>Metrowerks CodeWarrior IDE 1.7.2 is now publicly available from
>the Metrowerks Web site
Zooming in a pane of the browser. That is the feature I always wanted
without taking time to tell it. Thanks guys :)
Continue with the good work
=======================================================
Christophe ANDRES Chrisoft
20, rue Prosper Merimee (Software development)
67100 STRASBOURG. FRANCE
Tel.: (33) 03 88 65 99 94 Fax: (33) 03 88 65 99 59
Internet : chrisoft@calva.net
+++++++++++++++++++++++++++
>From craig@epic.co.uk (Craig Emery)
Date: Tue, 05 Nov 1996 08:54:31 +0000
Organization: Epic Miltimedia Group
Dear All,
the release notes fail to mention the wonderful fact that after
you've reset the toolbar, there is now a button for changing the project
settings.
I always wondered why that wasn't there before.
Excelent. Cheers fellow Warriors.
Craig.
-----------------------------------------------------------------------
| Norman Craig Emery B.Sc., craig@epic.co.uk |
| Team Leader / Senior CDi Programmer & CRAIG.EPIC@applelink.apple.com |
| Macintosh Programming Coordinator, Voice: +44 (0) (1273) 320637 |
| The Epic Multimedia Group, Fax: +44 (0) (1273) 821567 |
| http://www.epic.co.uk/ |
| VPS House, 52 Old Steine, Brighton, East Sussex, BN1 1NH, U.K. |
-----------------------------------------------------------------------
+++++++++++++++++++++++++++
>From ajl@ecs.soton.ac.uk (Andy Lewis)
Date: Tue, 05 Nov 1996 23:05:19 +0100
Organization: University of Southampton, Dept of Electronics & Computer Science
In article <jamesl-0111961157280001@jamesl.sirs.com>, jamesl@io.com (James
Lee) wrote:
> Just downloaded it and if one has run the update to 1.71 this one doesn't
> work!
So copy the old version (CodeWarrior IDE 1.7) off the CD-ROM, and update
that. Its a little irritating, but it only takes a couple of minutes, so
its not really a problem.
Andy
--
Andy Lewis (ajl@ecs.soton.ac.uk)
+++++++++++++++++++++++++++
>From jamesl@io.com (James Lee)
Date: 1 Nov 1996 16:58:13 GMT
Organization: (none)
In article <MWRon-3110961828470001@aumi3-a02.ccm.tds.net>,
MWRon@metrowerks.com (MW Ron) wrote:
> Metrowerks CodeWarrior IDE 1.7.2 is now publicly available from
> the Metrowerks Web site. This update includes numerous bug
> fixes for problems reported in the 1.7 IDE. It also
> incorporates the Metrowerks Version Control API. This version
> of the IDE is required to use the CodeManager IDE plugin found
> with CodeManager Release 3.
>
> The archive containing this update can be found at:
>
> <ftp://ftp.metrowerks.com/pub/updates/CW10/IDE_1.7.2.sit.hqx>
> Archive Size: 1142K
> There is no archive password.
>
> --
> METROWERKS Ron Liechty
> "Software at Work" MWRon@metrowerks.com
> http://www.metrowerks.com/about/people/rogues.html#mwron
Just downloaded it and if one has run the update to 1.71 this one doesn't work!
Thanks- Jim Lee
__________________________________________________________________
jamesl@io.com
---------------------------
>From Todd Martin <todd@decagon.com>
Subject: [Q] Initialize a resource at compile time
Date: Tue, 29 Oct 1996 23:38:17 -0800
Organization: Decagon Devices
Aloha:
How do I initialize a custom resource at compile time using CW9?
I need an equivalent version of this array initialization in 'c':
unsigned char MyArray[256] = {
0,0,0,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4, ... 8,8,8,8,8,9,9,9,9, \
10,10,10,10,10,11,11,11,11,12,12,12, ... 14,15,15,15,15,15, \
...
40,40,41,41,41,41,41,41,41,41,42,42, ...42,42,43,43,43,44,44, \
44,44,44,44,44,44,45,45,45,45,45,
};
How do I:
define a resorce for the data?
make an instance of my resorce in a myRez.r file? (compiled by CW9:Rez)
initialize the resorce with 256 byte-wide (decimal) data?
After all, good mac data belongs in resources...
Got the answer? Got an idea? Don't waite -- hit the reply button...
Thanks in advance,
Todd Martin
+++++++++++++++++++++++++++
>From mh@primenet.com (Mark Hartman)
Date: 30 Oct 1996 07:53:02 -0700
Organization: Mark Hartman Computer Solutions
In article <327705E9.5D24@decagon.com>, todd@decagon.com wrote:
>How do I initialize a custom resource at compile time using CW9?
You don't.
You use ResEdit or a resource compiler of some sort, and you create the
resource in the resource fork of your application (assuming that it is
a read-only resource).
======================================================================
Mark Hartman Computer Solutions - specializing in all things Macintosh
C C++ 4th Dimension Networking System design/architecture
tel +1(714)758.0640 -+- fax +1(714)999.5030 -+- e-mail mh@primenet.com
======================================================================
Macintosh: Where do you want to be tomorrow? And next year?
+++++++++++++++++++++++++++
>From tree@apple.com (Tom Emerson)
Date: Wed, 30 Oct 1996 09:39:05 -0500
Organization: Apple Computer, Inc.
In article <327705E9.5D24@decagon.com>, todd@decagon.com wrote:
>I need an equivalent version of this array initialization in 'c':
[elided]
You have two options available to you.
1. Define a new Rez type and and create the resource that way, i.e.
type 'xyzy'
{
wide array [256]
{
unsigned byte;
};
};
resource 'xyzy' (128)
{{
0,0,0,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4,
// et cetera
44,44,44,44,44,44,45,45,45,45,45
}};
You could easily write a little program that generates this
automagically.
2. Use the Data statement, which will require you to specify the
data with hex strings, i.e.
Data 'xyzy' (128)
{
$"000000010101010202020202030303030404"
// et cetera. don't put comma's at the end of each
// string so Rez will glom them together
$"2C2C2C2C2C2C2D2D2D2D2D2D"
};
Again, you could write a program to generate the Resource
statement.
Hope that helps.
-tre
--
Tom Emerson Cambridge R&D
Senior Software Engineer Apple Computer, Inc.
<mailto:tree@apple.com> <http://www.tiac.net/users/tree>
+++++++++++++++++++++++++++
>From Greg Jorgensen <gregj@europa.com>
Date: Fri, 01 Nov 1996 21:31:11 -0800
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Todd Martin wrote:
> How do I initialize a custom resource at compile time using CW9?
>
> I need an equivalent version of this array initialization in 'c':
>
> unsigned char MyArray[256] = {
> 0,0,0,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4, ... 8,8,8,8,8,9,9,9,9, \
> 10,10,10,10,10,11,11,11,11,12,12,12, ... 14,15,15,15,15,15, \
> ...
> 40,40,41,41,41,41,41,41,41,41,42,42, ...42,42,43,43,43,44,44, \
> 44,44,44,44,44,44,45,45,45,45,45,
> };
>
> How do I:
> define a resorce for the data?
> make an instance of my resorce in a myRez.r file? (compiled by CW9:Rez)
> initialize the resorce with 256 byte-wide (decimal) data?
Even if you use a .r file and include it in your project, all that
happens is Rez "compiles" the .r file into a resource file, and the
resulting resources are then included in the built project. You can just
as easily use ResEdit or Resorcerer to create the resource and edit it.
You can create a custom resource type by defining a template with
ResEdit or Resorcerer. A simply template for a list of byte-length
numbers would look like this:
resource type: TMPL
id: up to you (128 is fine)
name: NUM#
resource fields:
name: count type: ZCNT
name: ***** type: LSTC
name: value type: DBYT
name: ***** type: LSTZ
Save the resource file, then create a new resource of type 'NUM#'. Set
the resource ID and name to whatever you like (for this example I'll
assume the NUM# resource ID is 128). If you are using ResEdit you may
have to close & re-open the resource file before it can use the
template. Now you should see a standard list-editing resource window.
Add your 256 values (the count will show how many values there are),
then save & close the resource file (call it whatever you like). Leave
the TMPL resource in there for easy editing later. Add the resource file
to your CodeWarrior project.
In your code, declare a new type to match the list of numbers:
const short numlist_resid = 128; // whatever resource ID you used
above
struct numlist { // I assume you are using the C++ compiler
short count;
unsigned char values[1];
};
Define a numlist variable:
numlist* MyList = nil;
Replace your definition of MyArray with this:
unsigned char* MyArray = nil;
When your program starts up, get the NUM# resource and map it to your
MyList variable:
Handle MyListHandle = Get1Resource('NUM#', numlist_resid);
if ( MyListHandle ) {
DetachResource(MyListHandle);
HLockHi(MyListHandle);
MyList = (numlist*)(*MyListHandle);
MyArray = MyList->values;
...
}
else // error - resource is missing
Now you can use MyArray just like you have been.
When your program exits, or when you are done with the list, you should
dispose the list handle:
DisposeHandle(MyListHandle); // it was detached already
MyListHandle = nil;
MyList = nil;
MyArray = nil;
That's it. Good luck.
If you do this a lot I can send you a C++ template that can be used to
deal with any custom resource type that follows the count/list of
fixed-size things format, such as your NUM# resource.
--
Greg Jorgensen - Portland, Oregon, USA - gregj@europa.com
"In a recent fire, [Bob] Dole's library burned down. Both books were
lost. And he hadn't even finished coloring one." -- Jack Kemp
+++++++++++++++++++++++++++
>From Michael Hudson <sorry.no.email@nowhere.com>
Date: Fri, 01 Nov 1996 17:16:55 +0000
Organization: University of Leicester, UK
Todd Martin wrote:
>
> Aloha:
>
> How do I initialize a custom resource at compile time using CW9?
>
> I need an equivalent version of this array initialization in 'c':
>
> unsigned char MyArray[256] = {
> 0,0,0,1,1,1,1,2,2,2,2,2,3,3,3,3,4,4, ... 8,8,8,8,8,9,9,9,9, \
> 10,10,10,10,10,11,11,11,11,12,12,12, ... 14,15,15,15,15,15, \
> ...
> 40,40,41,41,41,41,41,41,41,41,42,42, ...42,42,43,43,43,44,44, \
> 44,44,44,44,44,44,45,45,45,45,45,
> };
>
> How do I:
> define a resorce for the data?
> make an instance of my resorce in a myRez.r file? (compiled by CW9:Rez)
> initialize the resorce with 256 byte-wide (decimal) data?
>
> After all, good mac data belongs in resources...
>
> Got the answer? Got an idea? Don't waite -- hit the reply button...
OK.
In a Rez file, go:
data 'Type' (128) {
Type out your data in hex longwords, go:
};
And compile. Or you could go:
type 'Type' {
array [256] { byte; }
};
resource 'Type' (128) {{
Type out your data in decimal (or hex) bytes, and go:
}};
Hope this helps.
--
Regards,
Michael Hudson
Please don't email this address - it's not mine.
---------------------------
>From CatGuy@lamg.com (Milo Shiff)
Subject: [Q] phonemes
Date: 25 Oct 1996 02:54:01 GMT
Organization: Los Angeles Macintosh Group BBS
As my class project in Interactive Multimedia Masters Class I am building a
program that is a research tool. I have been attempting to meet the needs of
the disabled, as required by federal law (Americans with Disabilities Act).
One obvious large segment of the disabled population are the blind and the
vision impaired. In addition to using large type for all text, I have
included speech files that have specially formatted copies of all the text
files, which are read out loud through MacInTalk or PlainTalk. In addition to
including word descriptions of picture and video, the files include extensive
use of the phonemes, especially in the pronounciation of names of persons and
places. I was very disappointed that Apple purposely left out non-English
phonemes, as this results in known wrong pronunciations of foreign words and
phrases.
Even worse, on one particular machine at school (a Mac 8100 with System
7.5.0 and PlainTalk from the System 7.5.5 CD -- the newer versions of the
operating system crash on that particular machine) ALL of the phonemes are
simply ignored, the voices simply skipping over those words!
Any suggestions on how to comply with federal law, as well as serve the
needs of the disabled population (which one is morally compelled to do
regardless of law)?
Also, I would be interested in hearing how other students and programmers
are going about complying with the federal ADA and making their software
available to the disabled.
+++++++++++++++++++++++++++
>From squires@crl.com (Scott Squires)
Date: Fri, 25 Oct 1996 07:06:04 -0700
Organization: Puffin Designs
> Disabled and limitations of PlainTalk.
You might check the Apple Web site. I think Apple has a section and
contact
for disabled support. Maybe they can be of help.
-scott
Scott Squires "Insert funny stuff here"
squires@crl.com
ScottSquir@aol.com
+++++++++++++++++++++++++++
>From Greg Jorgensen <gregj@europa.com>
Date: Sun, 03 Nov 1996 14:38:25 -0800
Organization: SCN Research/Qic Laboratories of Tigard, Oregon.
Milo Shiff wrote:
>
> As my class project in Interactive Multimedia Masters Class I am building a
> program that is a research tool. I have been attempting to meet the needs of
> the disabled, as required by federal law (Americans with Disabilities Act).
> One obvious large segment of the disabled population are the blind and the
> vision impaired. In addition to using large type for all text, I have
> included speech files that have specially formatted copies of all the text
> files, which are read out loud through MacInTalk or PlainTalk. In addition to
> including word descriptions of picture and video, the files include extensive
> use of the phonemes, especially in the pronounciation of names of persons and
> places. I was very disappointed that Apple purposely left out non-English
> phonemes, as this results in known wrong pronunciations of foreign words and
> phrases.
Are you so sure Apple "purposely" left out foreign phonemes? Perhaps
they just chose to not include them in the US English version of the
MacOS. My English dictionary doesn't have many Spanish words, either,
but I don't think the publisher was up to no good leaving them out. Have
you checked to see what is installed with foreign-language versions of
the System Software? The Mac OS supports multiple scripts and
localizations; I don't know if the MacInTalk phonemes are also localized
but I would assume they are, or could be.
Have you checked the Speech Manager, MacInTalk, and PlainTalk developer
information -- tech notes, articles, "d e v e l o p" magazine articles,
sample code, etc. -- at the Apple developer site? It's at
<http://devworld.apple.com>
> Even worse, on one particular machine at school (a Mac 8100 with System
> 7.5.0 and PlainTalk from the System 7.5.5 CD -- the newer versions of the
> operating system crash on that particular machine) ALL of the phonemes are
> simply ignored, the voices simply skipping over those words!
Sounds like there is either something wrong with that machine or the
installation is screwed up.
> Any suggestions on how to comply with federal law, as well as serve the
> needs of the disabled population (which one is morally compelled to do
> regardless of law)?
There is no legal requirement for most software to comply with the ADA.
Perhaps your software must comply due to your funding source or other
details, but the Federal Law doesn't place any legal obligation on most
software developers. Regardless of the moral question, you shouldn't
simplify your statements to such an extent that readers are misled. One
could easily read your posting as saying that software which doesn't
serve the needs of everyone is breaking Federal law, which isn't true.
> Also, I would be interested in hearing how other students and programmers
> are going about complying with the federal ADA and making their software
> available to the disabled.
Apple has quite a bit of information on this subject; I think you can
get it from their web site, or simply call them and ask about it: (408)
996-1010. And Microsoft has done significant work to make their software
accessible to the disabled. Most of their work applies to Windows, but
if you are interested in making computers and software accessible to
everyone it can't hurt to see how 80% of the market does it.
--
Greg Jorgensen - Portland, Oregon, USA - gregj@europa.com
"In a recent fire, [Bob] Dole's library burned down. Both books were
lost. And he hadn't even finished coloring one." -- Jack Kemp
+++++++++++++++++++++++++++
>From <jcushing@grove.ufl.edu>
Date: Fri, 1 Nov 1996 13:04:03 -0500
Organization: University of Florida
On 25 Oct 1996, Milo Shiff wrote:
> Also, I would be interested in hearing how other students and programmers
> are going about complying with the federal ADA and making their software
> available to the disabled.
I'll admit I'm not familiar with how the Americans with Disabilities Act
applies to computers, but let me say I think it is impractical for the
Federal government to require software designers to make every program
usuable by the disabled. I do not want to come off as insensitive, but
programming is a time consuming chore in itself, and not every program can
be realistically be made accessible to the disabled without the majority
of the public suffering. For instance, I hear the blind (understandably)
lament the rise in graphical user interfaces, because they are less
adaptable to Text-to-speech programs, but the majority, who is not blind,
finds GUIs much more usable than old fashioned command line interfaces. I
certainly would not stand for it if the government interpretted the ADA to
mean that GUIs (and other software that may limit the accessibility of the
disabled) should be outlawed.
Anyway, before I pass further judgement, just how does the ADA apply to
computer programs? Since the majority of computer programs do not feature
large fonts, text to speech, or other such features, I assume that
presently the Federal government has left compliance up to the common
sense of the developers, something I find rare when it comes to Federal
regulator administrations.
---------------------------
>From jsoltys@woodinville.com (John Soltys)
Subject: [Q] what sends an update event?
Date: Sat, 26 Oct 1996 12:12:29 -0700
Organization: The Edwards Agency
What can generate an update event? I've got a single window open and the
scroll bars are continually updated (redrawing and flashing and gernally
being a nuisance) and I can't figure out what's forcing the update.
Any help would be very much appreciated.
+++++++++++++++++++++++++++
>From Steve Makohin <WaterEdgSW@aol.com>
Date: 26 Oct 1996 20:21:06 GMT
Organization: Water's Edge Software
In article <jsoltys-2610961212290001@ppp-1-35.connect.com> John Soltys,
jsoltys@woodinville.com writes:
>What can generate an update event? I've got a single window open and the
>scroll bars are continually updated (redrawing and flashing and gernally
>being a nuisance) and I can't figure out what's forcing the update.
>
>Any help would be very much appreciated.
When your app calls WaitNextEvent or GetNextEvent, the Event Manager
checks with the Window Manager to see if any windows have a non-empty
update region. The update region contains the area that needs to be
refreshed.
When your app gets an update event for a window, it should do the
following:
BeginUpdate(theWindowPtr);
UpdateTheWindow; {your drawing code}
EndUpdate(theWindowPtr);
BeginUpdate and EndUpdate clear our the update region so the next time
you call WaitNextEvent, you won't get an update event for that window.
-Steve Makohin
Water's Edge Software
(Makers of Tools Plus & SuperCDEFs)
http://www.interlog.com/~wateredg
+++++++++++++++++++++++++++
>From nospam.djembe@sprynet.com.nospam (Mike Cohen)
Date: Sun, 27 Oct 1996 14:04:27 -0700
Organization: ISIS International
In article <jsoltys-2610961212290001@ppp-1-35.connect.com>,
jsoltys@woodinville.com (John Soltys) wrote:
>What can generate an update event? I've got a single window open and the
>scroll bars are continually updated (redrawing and flashing and gernally
>being a nuisance) and I can't figure out what's forcing the update.
>
>Any help would be very much appreciated.
It sounds like you're not calling BeginUpdate() and EndUpdate() when you
handle your update events. After a region is invalidated, WaitNextEvent()
will feed you update events (they don't go through the event queue) for any
window with a non-empty update region. The update region only gets cleared
when you call BeginUpdate/EndUpdate.
[Mike Cohen | djembe@pobox.com | http://pobox.com/~djembe (personal)]
[ | isis@pobox.com | http://www.isis-intl.com/ (company)]
[ Harry Browne for President - http://www.harrybrowne96.org ]
[ Fight California's Prop. 211 - http://www.tafl.com/index.html ]
*** JUNK MAIL NOT ACCEPTED - I CHANGED MY RETURN ADDRESS SO SPAMMERS
*** CAN'T GET MY EMAIL ADDRESS FROM MY POSTS. IF YOU WISH TO REPY,
*** COPY MY EMAIL ADDRESS FROM MY SIGNATURE
+++++++++++++++++++++++++++
>From "Aidan Cully" <aidan@xanadu.kublai.com>
Date: 1 Nov 96 12:11:36 -0400
Organization: INTAC Access Corporation - An Internet Service Provider
>What can generate an update event? I've got a single window open and the
>scroll bars are continually updated (redrawing and flashing and gernally
>being a nuisance) and I can't figure out what's forcing the update.
>
>Any help would be very much appreciated.
I had this trouble myself, when I started using Scroll Bars. The problem
seemes to arise from the fact that Hiding the scroll bars added them to the
updateRgn of a window. In my DoUpdate() procedure, I was doing something
which caused HideControl() to be called again from another one of my code
modules. I'm not sure about this, I remember being fairly frustrated, but
it was something like this.
---------------------------
End of C.S.M.P. Digest
**********************